
// 拖拽元素类型
export type DRAG_TYPE = 'TEXT' | 'IMAGE' | 'QRCODE' | 'TABLE_SHEET' | 'PIVOT_SHEET'  | 'GRID'  | 'DIVIDER';

// 拖拽元素名称
export type DRAG_NAME = '文本' | '图片' | '二维码' | '明细表' | '透视表'  | '静态网格'  | '分割线';

// 页面组装元素
export type DomItem = {
    reportId: number;
    id: number;
    type: DRAG_TYPE;
    name: DRAG_NAME;
    display: 'flex',
    position: 'relative' | 'absolute',
    x: number;
    y: number;
    width: number | 'auto';
    height: number | 'auto';
    widthAdaptive: boolean;
    heightAdaptive: boolean;
    props: TextProps | ImageProps | QrcodeProps | TableSheetProps | PivotSheetProps | GridProps | DividerProps;
};

// 文本类型属性
export type TextProps = {
    text: string;
    fontSize: number;
    color: string;
    fontWeight: string;
};

// 图片类型属性
export type ImageProps = {

};

// 二维码类型属性
export type QrcodeProps = {

};

// 明细表类型属性
export type TableSheetProps = {

};

// 透视表类型属性
export type PivotSheetProps = {

};

// 网格类型属性
export type GridProps = {

};

// 分割线类型属性
export type DividerProps = {

};

export interface DragItem {
  type: DRAG_TYPE;
  name: DRAG_NAME;
}

export interface DropResult {
  success: boolean;
}

export type DragCollectedProps = {
  isDragging: boolean;
};

export type DropCollectedProps = {
  isOver: boolean;
  canDrop: boolean;
};